/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package utility;

import java.util.Calendar;
import java.util.Date;

/**
 *
 * @author Jeppe
 */
public abstract class DateUtility {
    public static String[] hentMåneder() {
        String[] månedList = new String[]{"Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"};
        return månedList;
    }
    
    public static int[] hentÅr(){
        int [] årList = new int[10];
        for (int i = 0; i < 10; i++) {
            årList[i] = Calendar.getInstance().getTime().getYear()+1900-i;
        }
        return årList;
    }
    
    public static int daysBetween(Date d1, Date d2) {
        return (int) ((d2.getTime() - d1.getTime()) / (1000 * 60 * 60 * 24));
    }
}
